home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / Draw / Sources / TextShp.h < prev    next >
Encoding:
Text File  |  1996-04-25  |  2.2 KB  |  98 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                TextShp.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Author:                Henri Lamiraux
  7. //
  8. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #ifndef TEXTSHP_H
  13. #define TEXTSHP_H
  14.  
  15. #ifndef CONSTANT_H
  16. #include "Constant.h"
  17. #endif
  18.  
  19. #ifndef BASESHP_H
  20. #include "BaseShp.h"
  21. #endif
  22.  
  23. #ifndef BOUNDSHP_H
  24. #include "BoundShp.h"
  25. #endif
  26.  
  27. // ----- Framework Layer -----
  28.  
  29. #ifndef FWSELECT_H
  30. #include "FWSelect.h"
  31. #endif
  32.  
  33. // ----- OS Layer -----
  34.  
  35. #ifndef FWINK_H
  36. #include "FWInk.h"
  37. #endif
  38.  
  39. #ifndef FWSTYLE_H
  40. #include "FWStyle.h"
  41. #endif
  42.  
  43. #ifndef FWPOINT_H
  44. #include "FWPoint.h"
  45. #endif
  46.  
  47. #ifndef FWRECT_H
  48. #include "FWRect.h"
  49. #endif
  50.  
  51. // ----- Foundation Layer -----
  52.  
  53. #ifndef FWRUNTYP_H
  54. #include "FWRunTyp.h"
  55. #endif
  56.  
  57. //========================================================================================
  58. // Forward Declarations
  59. //========================================================================================
  60.  
  61. class CDrawFacetClipper;
  62.  
  63. //========================================================================================
  64. // class CTextShape
  65. //========================================================================================
  66.  
  67. class CTextShape : public CBoundedShape
  68. {
  69. public:
  70.     FW_DECLARE_CLASS
  71.     FW_DECLARE_AUTO(CTextShape)
  72.  
  73. public:
  74.     CTextShape();
  75.     CTextShape(FW_CReadableStream& archive);
  76.     virtual ~CTextShape();
  77.                 
  78.     // ----- Archiving -----
  79.     static void*         Read(FW_CReadableStream& stream, FW_ClassTypeConstant type);
  80.     virtual void        Flatten(FW_CWritableStream& archive);
  81.     
  82.     // ----- Shape -----
  83.     virtual void        GetClipRegion(Environment* ev, ODShape* clipRegion);
  84.     virtual ODShape*    CreateShapeOutline(Environment *ev);
  85.     
  86.     virtual FW_Boolean    HitTest(Environment *ev, FW_CGraphicContext& gc, const FW_CMouseEvent& theMouseEvent) const;
  87.     virtual void        RenderShape(Environment* ev, ODFacet* facet, FW_CGraphicContext& gc);
  88.  
  89. protected:
  90.     CTextShape(unsigned short shapeType, unsigned short renderVerb);
  91.  
  92. private:
  93.     virtual void         OutlineShape(FW_CGraphicContext& gc, const FW_CInk& ink, const FW_CStyle& style, const FW_CRect& rect);
  94.     FW_CString            fText;
  95. };
  96.  
  97. #endif
  98.